<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProductsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('products', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedBigInteger('team_id');
            $table->string('name')->default('')->comment('稱呼');
            $table->json('img')->default('')->comment('照片');
            $table->longText('detail')->nullable()->comment('介紹');
            $table->tinyInteger('status')->default('1')->comment('狀態');
            $table->integer('sort')->default('0')->comment('排序');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('products');
    }
}
